import request from '@/utils/request'
//  获取商品中心列表
export function getstorecenter(params) {
  return request({
    url: '/cloudApi/goods/goods/getGoodsList',
    method: 'get',
    params
  })
}

//  获取商品中心一个的商品详情
export function getstoredetail(params) {
  return request({
    url: '/cloudApi/goods/goods/getByGoodsId',
    method: 'get',
    params
  })
}
//  添加商品SKU
export function addsku(data) {
  return request({
    url: '/cloudApi/goods/goods/insertGoodsSKU',
    method: 'post',
    data
  })
}

//  增加商品基本信息商品
export function addstoreinforn(data) {
  return request({
    url: '/cloudApi/goods/goods/insertGoods',
    method: 'post',
    data
  })
}

//  获取渠道列表
export function getChannelList(params) {
  return request({
    url: '/cloudApi/merchant/channel/getChannelList',
    method: 'get',
    params
  })
}
//  保存渠道
export function saveGoodsChannel(data) {
  return request({
    url: '/cloudApi/goods/goods/replaceGoodsChannel',
    method: 'post',
    data
  })
}
//  获取指定商品的SKU详情
export function getskulist(params) {
  return request({
    url: '/cloudApi/goods/goods/getGoodsSkuList',
    method: 'get',
    params
  })
}

//  删除商品SKU
export function delsku(data) {
  return request({
    url: '/cloudApi/goods/goods/removeGoodsSKU',
    method: 'post',
    data
  })
}

//  删除商品SKU
export function delstores(data) {
  return request({
    url: '/cloudApi/goods/goods/removeGoods',
    method: 'post',
    data
  })
}

//  修改商品基本信息
export function xgstoreinfor(data) {
  return request({
    url: '/cloudApi/goods/goods/replaceGoods',
    method: 'post',
    data
  })
}
//  修改商品渠道
export function xgstoreqd(data) {
  return request({
    url: '/cloudApi/goods/goods/replaceGoodsChannel',
    method: 'post',
    data
  })
}

//  修改商品SKU
export function xgstoresku(data) {
  return request({
    url: '/cloudApi/goods/goods/replaceGoodsSKU',
    method: 'post',
    data
  })
}
//  商品列表修改上下架状态
export function xgupclo(data) {
  return request({
    url: '/cloudApi/goods/goods/shelvesGoods',
    method: 'post',
    data
  })
}
//  获取完整的商品品牌列表
export function hqallbrand(params) {
  return request({
    url: '/cloudApi/goods/goodsBrand/getGoodsBrandAll',
    method: 'get',
    params
  })
}

//  获取完整的商品标签列表
export function hqalltags(params) {
  return request({
    url: '/cloudApi/goods/goodsTag/getTagListAll',
    method: 'get',
    params
  })
}

// 商品批量上/下架接口
export function BatchStoreUpApi(data) {
  return request({
    url: '/cloudApi/goods/goods/shelvesGoodsBatch',
    method: 'post',
    data
  })
}

// 商品批量删除接口
export function BatchStoreRemoveApi(params) {
  return request({
    url: '/cloudApi/goods/goods/removeGoodsBatch',
    method: 'post',
    data: params
  })
}
